<template>
  <div class="site-aside-container">
    <template v-if="data">
      <Avatar
          :size="150"
          :url="data.avatar"
      ></Avatar>
      <h1 class="title">{{data.siteTitle}}</h1>
    </template>
    <Menu></Menu>
    <Contact v-if="data"></Contact>
    <p v-if="data" class="footer">{{data.icp}}</p>
  </div>
</template>

<script>
import Contact from "@/components/SiteAside/Contact";
import Menu from "@/components/SiteAside/Menu";
import Avatar from "@/components/Avatar";
import {mapState} from "vuex";
export default {
  name: "SiteAside",
  components: {
    Contact,
    Menu,
    Avatar,
  },
  computed: {
    ...mapState("setting", ["loading", "data"])
  }
};
</script>

<style lang="less" scoped>
@import "~@/styles/var.less";
.avatar-container {
  margin: 0 auto;
}

.site-aside-container {
  background-color: @dark;
  padding: 20px 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;

  .title {
    font-size: 18px;
    text-align: center;
    color: #fff;
  }

  .footer {
    text-align: center;
    font-size: 14px;
    margin: 0;
  }
}
</style>
